Skip to content

Add METTLE 1.5 encoder - #21

Open
siddhir wants to merge 1 commit into
MICS-Lab:mainfrom
siddhir:add-mettle-1.5
Open

siddhir wants to merge 1 commit into
MICS-Lab:mainfrom
siddhir:add-mettle-1.5

Conversation

@siddhir

@siddhir siddhir commented Nov 15, 2026 •

Copy link
Copy Markdown

Adds METTLE 1.5 from Slideflow Labs as mettle15. We would like it to be considered for the THUNDER leaderboards.

METTLE 1.5 is a robustness fine-tune of H-optimus-0 for histopathology tile feature extraction: ViT-g/14 with four register tokens and a CLS refinement head, 224 × 224 input. The weights are on the Hugging Face Hub under CC-BY-NC-ND-4.0 with gated access (automatic approval after accepting the terms on the model page), like the other gated models THUNDER supports. (Updated: the license and gating were set on the model card after this PR was opened; the local validation below was run before gating was enabled.)

What this adds

  • config/pretrained_model/mettle15.yaml, the download entry (weights plus the model's config and code files) and a get_mettle loader. The model has a small head on top of the timm backbone, so it loads through AutoModel with trust_remote_code=True from the downloaded folder, as KEEP does.
  • Embeddings: classification tasks use the 1,536-dimensional refined CLS embedding, which is the model's default output; segmentation uses the 1,536-dimensional patch tokens, excluding CLS and the four register tokens.
  • Preprocessing from the model card: direct bicubic resize to 224 × 224 and the model's normalization.
  • LoRA block names (backbone.blocks, attn.qkv), README and docs entries.

Evaluate with the standard THUNDER workflow:

thunder download-models mettle15
sbatch scripts/benchmark_all_tasks.sh mettle15

Local validation

CPU, FP32, with timm 1.0.20, on two synthetic 256 × 256 RGB tiles, through download_models("mettle15") and get_model_from_name("mettle15", "cpu"):

input (2, 3, 224, 224) -> pooled (2, 1536) | dense (2, 256, 1536)
transform vs HF processor max abs diff: 0.0
pooled vs model-card default output max abs diff: 0.0
mean(dense) vs model's mean_patch_embedding max abs diff: 0.0
input gradient nonzero: True
LoRA blocks: 40 | forward with LoRA: (1, 1536) finite: True

Not done here: no THUNDER dataset or task was run, so this PR reports no benchmark numbers, and nothing was run on GPU.

🤖 Generated with Claude Code

https://claude.ai/code/session_01SxonfkyZzXXwd2ggTQZXxQ

Adds METTLE 1.5 (https://huggingface.co/slideflow-labs/mettle-1.5) as `mettle15`:
config, download entry, loader, embedding extraction (1536-dim refined CLS for
classification, 1536-dim patch tokens for segmentation), LoRA block names, docs.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SxonfkyZzXXwd2ggTQZXxQ

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant